Apparatus and method for machine learning based on monotonically increasing quantization resolution

ABSTRACT

Disclosed herein are an apparatus and method for machine learning based on monotonically increasing quantization resolution. The method, in which a quantization coefficient is defined as a monotonically increasing function of time, includes initially setting the monotonically increasing function of time, performing machine learning based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time, determining whether the quantization coefficient satisfies a predetermined condition after increasing the time, newly setting the monotonically increasing function of time when the quantization coefficient satisfies the predetermined condition, and updating the quantization coefficient using the newly set monotonically increasing function of time. Here, performing the machine learning, determining whether the quantization coefficient satisfies the predetermined condition, newly setting the monotonically increasing function of time, and updating the quantization coefficient may be repeatedly performed.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of Korean Patent Application No. 10-2020-0061677, filed May 22, 2020, and No. 10-2021-0057783, filed May 4, 2021, which are hereby incorporated by reference in their entireties into this application.

BACKGROUND OF THE INVENTION 1. Technical Field

The present invention relates to machine learning and signal processing.

2. Description of the Related Art

Quantization technology is one of technologies that have been researched in a signal-processing field for a long time, and with regard to machine learning, research for implementing large-scale machine-learning networks or for compressing machine-learning results to make the same more lightweight has been carried out.

Particularly these days, research for adopting quantization in learning itself and using the same for implementation of embedded systems or dedicated neural-network hardware is underway. Quantized learning yields satisfactory results in some fields, such as image recognition and the like, but quantization is generally known not to exhibit good optimization performance due to the presence of quantization errors.

SUMMARY OF THE INVENTION

An object of an embodiment is to minimize quantization errors and implement an optimization algorithm having good performance in lightweight hardware in machine-learning and nonlinear-signal-processing fields in which quantization is used.

A machine-learning method based on monotonically increasing quantization resolution, in which a quantization coefficient is defined as a monotonically increasing function of time, according to an embodiment may include initially setting the monotonically increasing function of time, performing machine learning based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time, determining whether the quantization coefficient satisfies a predetermined condition after increasing the time, newly setting the monotonically increasing function of time when the quantization coefficient satisfies the predetermined condition, and updating the quantization coefficient based on the newly set monotonically increasing function of time. Here, performing the machine learning, determining whether the quantization coefficient satisfies the predetermined condition, newly setting the monotonically increasing function of time, and updating the quantization coefficient may be repeatedly performed.

Here, the quantization coefficient may be defined as a function varying over time as shown in Equation (32) below:

$\begin{matrix} {{{\sigma(t)} = {\frac{\gamma}{24} \cdot {Q_{p}^{- 2}(t)}}},{\gamma \in R}} & (32) \end{matrix}$

Here, Q may be defined as shown in Equation (33) below:

Q _(p) =η·b ^(n) η∈Z ⁺ ,η<b  (33)

where a base b is b∈Z⁺, b≥2.

Here, the quantized learning equation may be a learning equation for acquiring quantized weight vectors for all times, as defined in Equation (34) below:

$\begin{matrix} \begin{matrix} {w_{t + 1}^{Q} = {w_{t}^{Q} - {{\frac{\alpha_{t}}{Q_{p}^{2}} \cdot Q_{p}}{\nabla{f\left( w_{t} \right)}}} + {{\overset{\rightarrow}{ɛ}}_{t}Q_{p}^{- 1}}}} \\ {= {{w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}} \cdot {\frac{1}{Q_{p}}\left\lbrack {Q_{p}{\nabla{f\left( w_{t} \right)}}} \right\rbrack}}}\because{\alpha_{t} \in {Q\left( {0,Q_{p}} \right)}}}} \\ {= {w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}}{\nabla{f^{Q}\left( w_{t} \right)}}}}} \end{matrix} & (34) \end{matrix}$

Here, the quantized learning equation may be a learning equation based on a binary number system, as defined in Equation (35) below:

w _(t+1) ^(Q) =w _(t) ^(Q)−2^(−(n-k))∇ƒ^(Q)(w _(t)), n,k∈Z ⁺ , n>k  (35)

Here, the quantized learning equation may be a probability differential learning equation defined in Equation (36) below:

dW _(s)=−λ_(t)∇ƒ(W _(s))ds+√{square root over (2σ(s))}·d{right arrow over (B)} _(s)  (36)

Here, the quantization coefficient may be defined using h(t), which is a monotonically increasing function of time, as shown in Equation (37) below:

Q _(p) =η·b ^(h(t)), such that h (t)↑∞ as t→∞  (37)

Here, initially setting the monotonically increasing function of time may be configured to set the monotonically increasing function so as to satisfy Equation (38) below:

$\begin{matrix} {{{\frac{C}{\ln\; 2} \leq {\sigma(t)}}❘_{t = 0}} = {{{\frac{\gamma}{24} \cdot \left( {\eta \cdot b^{\overset{\_}{h}{(0)}}} \right)^{- 1}} \leq \frac{C_{1}}{\ln\; 2}} = {{\left. {T(t)}\Longrightarrow\log_{b} \right.\frac{\gamma ln2}{24\eta}C_{1}^{- 1}} \leq {\overset{\_}{h}(0)} \leq {\log_{b}\frac{\gamma ln2}{24\eta}C^{- 1}}}}} & (38) \end{matrix}$

Here, when determining whether the quantization coefficient satisfies the predetermined condition is performed, the predetermined condition may be Equation (39) below:

$\begin{matrix} {{\sigma(t)} \geq \frac{C}{\log\left( {t + 2} \right)}} & (39) \end{matrix}$

Here, when newly setting the monotonically increasing function of time is performed, the monotonically increasing function of time may be defined as Equation (40) below:

$\begin{matrix} {{\overset{\_}{h}\left( t_{1} \right)} = \left\lfloor {{\log_{b}\frac{\gamma ln2}{24\eta}C^{- 1}} + 0.5} \right\rfloor} & (40) \end{matrix}$

A machine-learning apparatus based on monotonically increasing quantization resolution according to an embodiment may include memory in which at least one program is recorded and a processor for executing the program. A quantization coefficient may be defined as a monotonically increasing function of time, and the program may perform initially setting the monotonically increasing function of time, performing machine learning based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time, determining whether the quantization coefficient satisfies a predetermined condition after increasing the time, newly setting the monotonically increasing function of time when the quantization coefficient satisfies the predetermined condition, and updating the quantization coefficient based on the newly set monotonically increasing function of time. Here, performing the machine learning, determining whether the quantization coefficient satisfies the predetermined condition, newly setting the monotonically increasing function of time, and updating the quantization coefficient may be repeatedly performed.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features, and advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:

FIG. 1 and FIG. 2 are views for explaining a method for machine learning having monotonically increasing quantization resolution;

FIG. 3 is a flowchart for explaining a machine-learning method based on monotonically increasing quantization resolution according to an embodiment;

FIG. 4 is a hardware concept diagram according to an embodiment; and

FIG. 5 is a view illustrating a computer system configuration according to an embodiment.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The advantages and features of the present invention and methods of achieving the same will be apparent from the exemplary embodiments to be described below in more detail with reference to the accompanying drawings. However, it should be noted that the present invention is not limited to the following exemplary embodiments, and may be implemented in various forms. Accordingly, the exemplary embodiments are provided only to disclose the present invention and to let those skilled in the art know the category of the present invention, and the present invention is to be defined based only on the claims. The same reference numerals or the same reference designators denote the same elements throughout the specification.

It will be understood that, although the terms “first,” “second,” etc. may be used herein to describe various elements, these elements are not intended to be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element discussed below could be referred to as a second element without departing from the technical spirit of the present invention.

The terms used herein are for the purpose of describing particular embodiments only, and are not intended to limit the present invention. As used herein, the singular forms are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,”, “includes” and/or “including,” when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

Unless differently defined, all terms used herein, including technical or scientific terms, have the same meanings as terms generally understood by those skilled in the art to which the present invention pertains. Terms identical to those defined in generally used dictionaries should be interpreted as having meanings identical to contextual meanings of the related art, and are not to be interpreted as having ideal or excessively formal meanings unless they are definitively defined in the present specification.

As is generally known, when quantization resolution is sufficiently high and well defined, quantization errors can be considered to be white noise. Accordingly, if quantization errors can be defined as white noise or an independent and identically distributed (i.i.d.) process, the variance of the quantization errors may be made to monotonically decrease over time by setting the quantization errors to monotonically decrease over time.

When quantization resolution is given as a monotonically increasing function of time, quantization errors become a monotonically decreasing function of time, so a global optimization algorithm for a non-convex objective function can be implemented, and this is the same dynamics as a stochastic global optimization algorithm. Also, because of the use of quantization, a machine-learning algorithm that enables global optimization may be implemented even in systems having low computing power, such as embedded systems.

Accordingly, in an embodiment, global optimization is achieved in such a way that, when quantization to integers or fixed-point numbers, applied to an optimization algorithm, is performed, quantization resolution monotonically increases over time.

Hereinafter, a machine-learning apparatus and method having monotonically increasing quantization resolution according to an embodiment will be described in detail with reference to FIGS. 1 to 5.

In the machine-learning apparatus and method having monotonically increasing quantization resolution according to an embodiment, first, Definitions 1 to 3 below are required.

Definition 1

The objective function to be optimized may be defined as follows.

For a weight vector w_(t)∈R^(n) and a data vector x_(k)∈R^(n) in an epoch unit t, the objective function ƒ: R^(n)→R is as shown in Equation (1) below:

$\begin{matrix} {{{f\left( w_{t} \right)} \equiv {\frac{1}{N}{\sum\limits_{k = 1}^{N}{\overset{\_}{f}\left( {w_{t},x_{k}} \right)}}}} = {\frac{1}{N}{\sum\limits_{l = 1}^{L}{\sum\limits_{k = 1}^{B_{t}}{\overset{\_}{f}\left( {w_{t},x_{k}} \right)}}}}} & (1) \end{matrix}$

In Equation (1), ƒ: R^(n)×R→R denotes a loss function for the weight vector and the data vector, N denotes the number of all data vectors, L denotes the number of mini-batches, and B_(l) denotes the number of pieces of data included in the l-th mini-batch.

Definition 2

For an arbitrary vector x∈R, truncation of a fractional part is defined as shown in Equation (2) below:

x ^(Q) ≡└x┘+ϵ(ϵ∈R[0,1))  (2)

In Equation (2), x^(Q)∈Z is the whole part of the real number x.

Definition 3

The greatest integer function or the Gauss's bracket [⋅] is defined as shown in Equation (3) below:

[x]≡└x+0.5┘=x+0.5 −ϵ

x+ϵ  (3)

where ϵ∈R(−0.5,0.5] is a round-off error.

In an embodiment, the objective function satisfies the following assumption for convergence and feature analysis. Particularly, the following assumption is definitely satisfied when an activation function, having maximum and minimum limits and based on Boltzmann statistics or Fermion statistics, is used in machine learning.

Assumption 1

For an arbitrary vector x satisfying x∈R^(n), x∈B^(o)(x*,ρ), positive numbers (0<m<M<∞) satisfying the following equation are present for the objective function ƒ: R^(n)→R in which ƒ(x)∈C².

$\begin{matrix} {{m{v}^{2}} \leq \left\langle {v,{\frac{\partial^{2}f}{\partial x^{2}}(x)v}} \right\rangle \leq {M{v}^{2}}} & (4) \end{matrix}$

In Equation (4), B^(o)(x,ρ) is an open set that satisfies the following equation for a positive number ρ∈R, ρ>0.

B ^(o)(x*,ρ)={x|∥x−x*∥<ρ}.  (5)

Based on the definitions and assumptions described above, a machine-learning apparatus and method having monotonically increasing quantization resolution according to an embodiment will be described in detail.

In most existing studies on machine learning, quantization is defined in the form of multiplying a sign function of a variable x by a quantization function based on appropriate conditions for a quantization coefficient Q_(p) (Q_(p)∈Q,Q_(p)>0), as shown in Equation (6) below:

$\begin{matrix} {x^{Q} = \left\{ \begin{matrix} 0 & {{C\left( {x,{QP}} \right)} < \delta_{1}} \\ {{sign}(x)} & {\delta_{1} \leq {C\left( {x,{QP}} \right)} < \delta_{2}} \\ {{g\left( {x,Q_{p}} \right)}{{sign}(x)}} & {Otherwise} \end{matrix} \right.} & (6) \end{matrix}$

In existing studies, researchers have proposed definitions and applications of various forms of quantization coefficients in order to improve the performance of their quantization techniques. Most such quantization techniques are oriented toward increasing the accuracy of a quantization operation by decreasing quantization errors. That is, a quantization step value varies depending on the position of x, as shown in Equation (6), whereby quantization resolution is changed in the spatial terms, and this methodology generally exhibits good performance.

If defining quantization errors to be different in the spatial terms is capable of yielding a satisfactory result, as shown in the existing studies, defining quantization errors differently in terms of time may also yield a satisfactory result, and the present invention is based on this idea.

To this end, it is necessary to define more basic quantization than Equation (6), although derived from Equation (6). Accordingly, in an embodiment, a basic form of quantization may be defined using the above-described Definition 2 and Definition 3, as shown in Equation (7) below:

$\begin{matrix} {x^{Q}\overset{\Delta}{=}{{\frac{1}{Q_{p}}\left\lfloor {Q_{p} \cdot \left( {x + {0.5 \cdot Q_{p}^{- 1}}} \right)} \right\rfloor} = {{\frac{1}{Q_{p}}\left\lbrack {Q_{p} \cdot x} \right\rbrack} \in Q}}} & (7) \end{matrix}$

Based on Equation (7), an equation for the quantization error may be defined as shown in Equation (8) below:

$\begin{matrix} {x^{Q} = {{\frac{1}{Q_{p}}\left\lfloor {Q_{p} \cdot \left( {x + {0.5 \cdot Q_{p}^{- 1}}} \right)} \right\rfloor} = {{\frac{1}{Q_{p}}\left( {{Q_{p} \cdot x} + ɛ} \right)} = {x + {ɛQ}_{p}^{- 1}}}}} & (8) \end{matrix}$

According to an embodiment, when the fixed quantization step Q_(p) in Equation (8) is given as a function increasing with time, a quantization error that monotonically decreases over time is simply acquired.

Also, it has been proved that if quantization errors are asymptotically pairwise independent and have uniform distribution in a quantization error range, the quantization errors are white noise.

It is intuitively obvious that in order for quantization errors to have uniform distribution, quantization must be uniform quantization. Accordingly, an embodiment assumes only uniform quantization having identical resolution at the same t, without changing the quantization resolution in the spatial terms.

Also, because a binary number system is generally used in engineering, the quantization parameter Q_(p) is defined as shown in Equation (9) below in order to support the binary number system.

Q _(p) =η·b ^(n) η∈Z ⁺ , η<b  (9)

where the base b is b∈Z⁺, b≥2.

Based on the above-described assumption, if quantization of x is uniform quantization according to the quantization parameter defined by Equations (7) and (9) in the present invention, the quantization error ϵQ_(p)(t)=x^(Q)−x is regarded as white noise.

In order to apply this to general machine-learning, it is assumed that white noise described by Equation (10) is defined for an n-dimensional weight vector w_(t)∈R^(n).

{right arrow over (ϵ)}Q _(p) =x ^(Q) −x={ϵ ₀,ϵ₁, . . . ϵ_(n-1) }∈R ^(n)  (10)

Based on the above-described Definition 1, a general gradient-based learning equation may be as shown in Equation (11) below:

w _(t+1) =w _(t)−λ_(t)∇ƒ(w _(t))  (11)

In Equation (11), λ_(t)∈R(0,1) is a learning rate, and satisfies λ_(t)=argmin_(λ) _(t) _(inR(0,1))ƒ(w_(t)−λ_(t)∇ƒ(w_(t))), and w_(t) is a weight vector that satisfies w_(t)∈R^(n).

Here, when the weight vectors w_(t) and w_(t+1) are assumed to be quantized, the learning equation in Equation (11) may be updated as shown in Equation (12) below:

w _(t+1) ^(Q)=(w _(t) ^(Q)−λ_(t)∇ƒ(w _(t)))^(Q) =w _(t) ^(Q)−(λ_(t)∇ƒ(w _(t)))^(Q).  (12)

When g(x,t)≡λ_(t)∇ƒ(x) is substituted into Equation (12) and when this is quantized based on Equation (7), Equation (13) may be derived.

$\begin{matrix} {{g(x)}^{Q} = {{\frac{1}{Q_{p}}\left\lfloor {Q_{p}\left( {{g(x)} + {0.5\; Q_{p}^{- 1}}} \right)} \right\rfloor} = {{{\frac{1}{Q_{p}} \cdot Q_{p}}{g(x)}} + {{\overset{\rightarrow}{ɛ}}_{t}Q_{p}^{- 1}}}}} & (13) \end{matrix}$

In Equation (13), {right arrow over (ϵ)}_(t) is a quantization error having a vector value that is defined as {right arrow over (ϵ)}_(t)∈R^(n), in which case the respective components thereof have errors defined in Definition 3 and the probability distributions of the components are independent.

If λ_(t)=a_(t)Q⁻¹ is satisfied because a rational number a_(t)∈Q(0,Q_(p)) is present, g(x) is factorized to g(x)=a_(t)Q_(p) ⁻¹h(x), which may be represented as shown in Equation (14) below:

$\begin{matrix} {{g(x)}^{Q} = {{{\frac{\alpha_{t}}{Q_{p}^{2}} \cdot Q_{p}}{h(x)}} + {{\overset{\rightarrow}{ɛ}}_{t}{Q_{p}^{- 1}.}}}} & (14) \end{matrix}$

When Equation (14) is substituted into Equation (12) after h(x) in Equation (14) is changed to ∇ƒ(w_(t)), the following quantized learning equation shown in Equation (15) may be acquired:

$\begin{matrix} \begin{matrix} {w_{t + 1}^{Q} = {w_{t}^{Q} - {{\frac{\alpha_{t}}{Q_{p}^{2}} \cdot Q_{p}}{\nabla{f\left( w_{t} \right)}}} + {{\overset{\rightarrow}{ɛ}}_{t}Q_{p}^{- 1}}}} \\ {{w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}} \cdot {\frac{1}{Q_{p}}\left\lbrack {Q_{p}{\nabla{f\left( w_{t} \right)}}} \right\rbrack}}}\because{\alpha_{t} \in {Q\left( {0,Q_{p}} \right)}}} \\ {w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}}{\nabla{f^{Q}\left( w_{t} \right)}}}} \end{matrix} & (15) \end{matrix}$

Consequently, Equation (15), which is a learning equation for acquiring quantized weight vectors for all steps t, is acquired through mathematical induction in an embodiment.

In consideration of general hardware based on binary numbers, b and are set to b=2, η=1 in Equation (9), so α_(t)=2^(k), k<n. Accordingly, Q_(p)=2^(n) is satisfied, and a quantized learning equation is simplified as shown in Equation (16) below:

w _(t+1) ^(Q) =w _(t) ^(Q)−2^(−(n-k))∇ƒ^(Q)(w _(t)), n,k∈Z ⁺ , n>k  (16)

Equation (16) shows that a learning equation in machine learning can be simplified through a right shift operation performed on the quantized ∇^(Q)ƒ(w_(t)).

As appears in Equation (16), the most extreme form of quantization is defined by k=n−1, and the quantized gradient becomes a single bit of a sign vector. Here, when ∥δ₂−δ₁∥=Q_(p) and

${{\delta_{1}} = \frac{Q_{p}}{2}},$

Equation (6) may be regarded as a quantization system that is uniformly quantized to Q_(p).

An embodiment is a quantization method configured to change Q_(p) over time, rather than spatial quantization.

Assuming that each component of {right arrow over (ϵ)}_(t)∈R^(n) in Equation (14) is defined like the round-off error of Definition 3 and that quantization errors are uniformly distributed, the variance of the quantization errors may be as shown in Equation (17) below:

$\begin{matrix} {{\forall{ɛ_{t} \in R}},{{{\mathbb{E}ɛ}_{t}^{2}Q_{p}^{- 2}} = \frac{1}{12 \cdot Q_{p}^{\; 2^{\prime}}}},{\forall{{\overset{\rightarrow}{ɛ}}_{t} \in R^{n}}},{{{\mathbb{E}}\; Q_{p}^{- 2}{\overset{\rightarrow}{ɛ}}_{t}^{2}} = {{{\mathbb{E}}\;{Q_{p}^{- 2} \cdot {{tr}\left( {{\overset{\rightarrow}{ɛ}}_{t}{\overset{\rightarrow}{ɛ}}_{t}^{T}} \right)}}} = {\frac{1}{12 \cdot Q_{p}^{\; 2}} \cdot n}}}} & (17) \end{matrix}$

When the variance of the quantization errors at an arbitrary time (t>0) is as shown in Equation (17), if ϵ_(t)Q_(p) ⁻¹ds=q·dB_(t) is given for a standard one-dimensional Wiener process dB_(t)∈R, Equation (18) may be derived.

$\begin{matrix} {{{\mathbb{E}ɛ}_{t}^{2}Q_{p}^{- 2}{ds}} = {{{\mathbb{E}}\; q^{2}{dB}_{t}^{2}} = {\left. {q^{2}{ds}}\Rightarrow{\frac{1}{12}Q_{p}^{- 2}} \right. = {\left. q^{2}\Rightarrow q \right. = {\sqrt{\frac{1}{12}} \cdot Q_{p}^{- 1}}}}}} & (18) \end{matrix}$

In the same manner, when d{right arrow over (B)}_(t)={right arrow over (ϵ)}ds∈R^(n) is given as a vector-form Wiener process and when {right arrow over (ϵ)}_(t)Q_(p) ⁻¹ds=q·d{right arrow over (B)}_(t), is assumed, q=√{square root over (n/12)}·Q_(p) ⁻¹ is acquired.

Here, if the variance of the quantization errors in Equation (18) is a function of time, because only the quantization coefficient Q_(p) is a parameter varying over time, Q_(p) is taken as a function of time, and Equation (19) is defined.

$\begin{matrix} {{{\sigma(t)} = {\frac{\gamma}{24} \cdot {Q_{p}^{- 2}(t)}}},{\gamma \in R}} & (19) \end{matrix}$

Therefore, when the learning equation is given as shown in Equation (11), if the quantized weight vector w_(t) ^(Q)∈R^(n) is regarded as a probability process {W_(t)}_(t=0) ^(∞), Equation (15), which is the learning equation, may be defined in the form of the probability differential equation shown in Equation (20) below:

$\begin{matrix} \begin{matrix} {{dW}_{\text{?}} = {{{- \lambda_{t}}{\nabla{f\left( W_{s} \right)}}{ds}} + {{\overset{\rightarrow}{ɛ}}_{\text{?}}{Q_{p}^{- 1}(s)}{ds}}}} \\ {= {{{- \lambda_{t}}{\nabla{f\left( W_{s} \right)}}{ds}} + {\sqrt{\frac{n}{12}}{Q_{p}^{- 1}(s)}d\overset{\rightarrow}{B_{s}}}}} \end{matrix} & (20) \end{matrix}\text{?}\text{indicates text missing or illegible when filed}$

When γ=n in Equation (20), a simplified equation may be derived, as shown in Equation (21) below:

dW _(t)=−λ_(t)∇ƒ(W _(s))ds+√{square root over (2σ(s))}·d{right arrow over (B)} _(s)  (21)

With regard to Equation (21), the transition probability of a weight vector is known as weakly converging to Gibb's probability, as shown in Equation (22), under appropriate conditions.

$\begin{matrix} {{{{\text{?}_{\sigma{(t)}}\left( W_{t} \right)} = {\frac{1}{Z_{\sigma{(t)}}}{\exp\left( {- \frac{f\left( W_{t} \right)}{\sigma(t)}} \right)}}},{{{where}\mspace{14mu} Z_{\sigma{(t)}}} = {\int_{R^{n}}{{\exp\left( {- \frac{f\left( W_{s} \right)}{\sigma(s)}} \right)}{ds}}}}}{\text{?}\text{indicates text missing or illegible when filed}}} & (22) \end{matrix}$

Here, it is known that, when σ(t)→0, the transition probability of the weight vector converges to the global minima of ƒ(W_(t)).

This means that the limit of Equation (19) is as shown in Equation (23) below:

$\begin{matrix} {{\underset{t \uparrow \infty}{\lim\;\sigma}(t)} = {{{\frac{\gamma}{24} \cdot \underset{t \uparrow \infty}{\lim\;\sigma}}{Q_{p}^{- 2}(t)}} = 0}} & (23) \end{matrix}$

That is, whenever t monotonically increases, the magnitude of the quantization coefficient monotonically increases (i.e., Q_(p)(t)↑∞) in response thereto, which means that the quantization resolution increases over time. That is, according to the present invention, after quantization resolution is set to be low at the outset (that is, a Q_(p) value is small), the quantization coefficient Q_(p) is increased according to a suitable time schedule, and when the quantization resolution becomes high, global minima may be found.

Here, a quantization coefficient determination method through which the global minima can be found will be additionally described below.

When Equation (21) and Equation (23) are satisfied, if σ(t) satisfying the condition of Equation (24) is given, global minima may be found by simulated annealing.

$\begin{matrix} {{\underset{t}{\inf\;{\sigma(t)}} = \frac{C}{\log\left( {t + 2} \right)}},{C \in R},{C\operatorname{>>}0}} & (24) \end{matrix}$

However, because σ(t) is a value that is proportional to the integer value Q_(p)(t), it is difficult to directly substitute a continuous function, as in Equation (24).

Other conditions are T(t)≥c/log(2+t), “T(t)↓0”, and “T(t) is continuously differentiable” while satisfying Equation (25).

$\begin{matrix} \begin{matrix} {{\frac{d}{dt}e^{- \frac{2\Delta}{T{(t)}}}} = \left. {{\frac{d{T(t)}}{dt} \cdot \frac{1}{T^{2}(t)}}e^{- \frac{2\Delta}{T{(t)}}}}\rightarrow 0 \right.} & {{\because\Delta} = {\sup\limits_{x,{y \in R^{n}}}\left( {{f(x)} - {f(y)}} \right)}} \end{matrix} & (25) \end{matrix}$

Accordingly, when T(t) is set as the upper limit of σ(t) and when

$\frac{C}{\log\left( {t + 2} \right)}$

is set as the lower limit of σ(t), σ(t) may be selected such that the characteristics of the upper-limit schedule T(t) is satisfied.

FIG. 1 and FIG. 2 illustrate the graphs of T(t) and σ(t) as a function of time t.

Referring to FIG. 1, T(t) and σ(t) may be defined by the relationship shown in Equation (26) below:

$\begin{matrix} {\frac{C}{\log\left( {t + 2} \right)} \leq {\sigma(t)} \leq {T(t)}} & (26) \end{matrix}$

In Equation (26), when a positive number a E. R is present and satisfies a<1, if T(t) is defined as T(t)=C₁/log(a·t+2) for C₁>C, T(t)≥C/log(t+2) is always satisfied. Accordingly, when σ(t) is set to satisfy Equations (9) and (19), which are conditions for quantization, while satisfying Equation (26), σ(t) satisfies Equation (25) although it is not continuously differentiable, whereby global minima can be found.

The quantization coefficient Q_(p)(t) may be defined as shown in Equation (27) below using h(t)∈Z⁺, which is a monotonically increasing function of time.

Q _(p)(t)=η·b ^(h(t)), such that h (t)↑∞ as t→∞  (27)

A machine-learning method based on monotonically increasing quantization resolution through which global minima can be found based on Equation (19), Equation (26), and Equation (27) will be described below.

FIG. 3 is a flowchart for explaining a machine-learning method based on monotonically increasing quantization resolution according to an embodiment.

Here, it is assumed that a quantization coefficient is given as shown in Equation (27) and that σ(t) satisfies Equation (19).

First, a monotonically increasing function of time is initially set at step S110. That is, as shown in FIG. 1, when t=0, h(0) satisfying the following is set.

$\begin{matrix} {{{\frac{C}{\ln\; 2} \leq {\sigma(t)}}❘_{t = 0}} = {{{\frac{\gamma}{24} \cdot \left( {\eta \cdot b^{\overset{\_}{h}{(0)}}} \right)^{- 1}} \leq \frac{C_{1}}{\ln\; 2}} = \left. {T(t)}\Rightarrow{{\log_{b}\frac{{\gamma ln}\mspace{11mu} 2}{24\eta}C_{1}^{- 1}} \leq {\overset{\_}{h}(0)} \leq {\log_{b}\frac{{\gamma ln}\mspace{11mu} 2}{24\eta}C^{- 1}}} \right.}} & (28) \end{matrix}$

If the number of bits suitable for an initial value is not found using Equation (28), a suitable h(0) is set, as shown in FIG. 2.

Then, machine learning is performed at step S120 based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time t.

Then, time is increased from t to t+1 at step S130, and whether the quantization coefficient satisfies a predetermined condition σ(t)≥T(t) is determined at step S140.

When it is determined at step S140 that the quantization coefficient does not satisfy the predetermined condition σ(t)≥T(t), that is, when σ(t)<T(t) is satisfied under the condition of t>0, the quantization coefficient is not updated, and σ(t) is set to

${\sigma(t)} = {\frac{\gamma}{24}{\left( {\eta \cdot b^{\overset{\_}{h{(0)}}}} \right)^{- 1}.}}$

Then, machine learning is performed at step S120 based on the quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time t.

Conversely, when it is determined at step S140 that the quantization coefficient satisfies the predetermined condition σ(t)≥T(t), the monotonically increasing function of time is newly set at step S150.

That is, if the first t satisfying σ(t)≥T(t) is t₁, h(t₁)∈Z⁺ satisfying

${\sigma(t)} \geq \frac{c}{\log\left( {t + 2} \right)}$

may be defined as shown in Equation (29) below:

$\begin{matrix} {{\overset{\_}{h}\left( {t + 1} \right)} = \left\lfloor {{\log_{b}\frac{\gamma\;\ln\; 2}{24\eta}C^{- 1}} + 0.5} \right\rfloor} & (29) \end{matrix}$

Then, the quantization coefficient is updated by the newly set monotonically increasing function of time at step S160.

Then, machine learning is performed at step S120 based on the quantized learning equation using the quantization coefficient defined by the monotonically increasing function of the time t.

Steps S120 to S160 may be repeated until a learning stop condition is satisfied at step S170.

Referring to FIG. 3, the time coefficient t may actually correspond to a single piece of data. However, when there is a large amount of data, scheduling may be performed by adjusting the time coefficient depending on the number of pieces of data.

For example, assuming that the number of all pieces of data is N, that there are L mini-batches, and that the respective mini-batches are assigned the same number of pieces of data, the time coefficient is updated by 1 each time N/L pieces of data are processed.

Here, when the time coefficient updated for each mini-batch is t′, the time coefficient may be defined as shown in Equation (30) below:

$\begin{matrix} {t^{\prime} = {\frac{N}{L} \cdot t}} & (30) \end{matrix}$

Meanwhile, when this is actually implemented in hardware, η=1, b=2 are satisfied in Equation (9) due to the characteristics of binary systems. Accordingly, Equation (29) for calculating variation in the quantization coefficient value over time may be simplified as shown in Equation (31) below:

$\begin{matrix} {{\overset{\_}{h}(t)} = \left\lfloor {{\log_{2}\frac{n\;\ln\; 2}{24}C^{- 1}} + 0.5} \right\rfloor} & (31) \end{matrix}$

FIG. 4 is a hardware concept diagram according to an embodiment.

That is, FIG. 4 illustrates the structure of the data storage device of a computing device for machine learning for supporting varying quantization resolution in order to implement the above-described machine-learning algorithm based on a quantization coefficient varying over time in hardware.

FIG. 5 is a view illustrating a computer system configuration according to an embodiment.

The machine-learning apparatus based on monotonically increasing quantization resolution according to an embodiment may be implemented in a computer system 1000 including a computer-readable recording medium.

The computer system 1000 may include one or more processors 1010, memory 1030, a user-interface input device 1040, a user-interface output device 1050, and storage 1060, which communicate with each other via a bus 1020. Also, the computer system 1000 may further include a network interface 1070 connected with a network 1080. The processor 1010 may be a central processing unit or a semiconductor device for executing a program or processing instructions stored in the memory 1030 or the storage 1060. The memory 1030 and the storage 1060 may be storage media including at least one of a volatile medium, a nonvolatile medium, a detachable medium, a non-detachable medium, a communication medium, and an information delivery medium. For example, the memory 1030 may include ROM 1031 or RAM 1032.

According to an embodiment, quantization is performed while quantization resolution is varied over time, unlike in existing machine-learning algorithms based on quantization, whereby better machine-learning and nonlinear optimization performance may be achieved.

According to an embodiment, because a methodology or a hardware design methodology based on which global optimization can be performed using integer or fixed-point operations is applied to machine learning and nonlinear optimization, optimization performance better than that of existing algorithms may be achieved, and excellent learning and optimization performance may be achieved in existing large-scale machine-learning frameworks, fields in which low power consumption is required, or embedded hardware configured with multiple large-scale RISC modules.

According to an embodiment, because there is no need for a floating-point operation module, which requires a relatively long computation time, the present invention may be easily applied in the fields in which real-time processing is required for machine learning, nonlinear optimization, and the like. 

What is claimed is:
 1. A machine-learning method based on monotonically increasing quantization resolution, in which a quantization coefficient is defined as a monotonically increasing function of time, comprising: initially setting the monotonically increasing function of time; performing machine learning based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time; determining whether the quantization coefficient satisfies a predetermined condition after increasing the time; newly setting the monotonically increasing function of time when the quantization coefficient satisfies the predetermined condition; and updating the quantization coefficient based on the newly set monotonically increasing function of time, wherein performing the machine learning, determining whether the quantization coefficient satisfies the predetermined condition, newly setting the monotonically increasing function of time, and updating the quantization coefficient are repeatedly performed.
 2. The machine-learning method of claim 1, wherein the quantization coefficient is defined as a function varying over time as shown in Equation (32) below: $\begin{matrix} {{{\sigma(t)} = {\frac{\gamma}{24} \cdot {Q_{p}^{- 2}(t)}}},{\gamma \in R}} & (32) \end{matrix}$
 3. The machine-learning method of claim 2, wherein Q is defined as shown in Equation (33) below: Q _(p) =η·b ^(n) η∈Z ⁺ ,η<b  (33) where a base b is b∈Z⁺, b≥2.
 4. The machine-learning method of claim 2, wherein the quantized learning equation is a learning equation for acquiring quantized weight vectors for all times, as defined in Equation (34) below: $\begin{matrix} \begin{matrix} {w_{t + 1}^{Q} = {w_{t}^{Q} - {{\frac{\alpha_{t}}{Q_{p}^{2}} \cdot Q_{p}}{\nabla{f\left( w_{t} \right)}}} + {{\overset{\rightarrow}{ɛ}}_{t}Q_{p}^{- 1}}}} \\ {= {{w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}} \cdot {\frac{1}{Q_{p}}\left\lbrack {Q_{p}{\nabla{f\left( w_{t} \right)}}} \right\rbrack}}}\because{\alpha_{t} \in {Q\left( {0,Q_{p}} \right)}}}} \\ {= {w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}}{\nabla{f^{Q}\left( w_{t} \right)}}}}} \end{matrix} & (34) \end{matrix}$
 5. The machine-learning method of claim 2, wherein the quantized learning equation is a learning equation based on a binary number system, as defined in Equation (35) below: w _(t+1) ^(Q) =w _(t) ^(Q)−2^(−(n-k))∇ƒ^(Q)(w _(t)), n,k∈Z ⁺ , n>k  (35)
 6. The machine-learning method of claim 2, wherein the quantized learning equation is a probability differential learning equation defined in Equation (36) below: dW _(s)=−λ_(t)∇ƒ(W _(s))ds+√{square root over (2σ(s))}·d{right arrow over (B)} _(s)  (36)
 7. The machine-learning method of claim 2, wherein the quantization coefficient is defined using {right arrow over (h)}(t), which is a monotonically increasing function of time, as shown in Equation (37) below: Q _(p) =η·b ^(h(t)), such that h (t)↑∞ as t→∞  (37)
 8. The machine-learning method of claim 7, wherein initially setting the monotonically increasing function of time is configured to set the monotonically increasing function so as to satisfy Equation (38) below: $\begin{matrix} {\left. {\frac{C}{\ln\; 2} \leq {\sigma(t)}} \right|_{t = 0} = {{{\frac{\gamma}{24} \cdot \left( {\eta \cdot b^{\overset{\_}{h}{(0)}}} \right)^{- 1}} \leq \frac{C_{1}}{\ln\; 2}} = \left. {T(t)}\Rightarrow{{\log_{b}\frac{\gamma\;\ln\; 2}{24\eta}C_{1}^{- 1}} \leq {\overset{\_}{h}(0)} \leq {\log_{b}\frac{\gamma\;\ln\; 2}{24\eta}C^{- 1}}} \right.}} & (38) \end{matrix}$
 9. The machine-learning method of claim 8, wherein, when determining whether the quantization coefficient satisfies the predetermined condition is performed, the predetermined condition is Equation (39) below: $\begin{matrix} {{\sigma(t)} \geq \frac{C}{\log\left( {t + 2} \right)}} & (39) \end{matrix}$
 10. The machine-learning method of claim 9, wherein, when newly setting the monotonically increasing function of time is performed, the monotonically increasing function of time is defined as Equation (40) below: $\begin{matrix} {{\overset{\_}{h}\left( t_{1} \right)} = \left\lfloor {{\log_{b}\frac{y\;\ln\; 2}{24\eta}C^{- 1}} + 0.5} \right\rfloor} & (40) \end{matrix}$
 11. A machine-learning apparatus based on monotonically increasing quantization resolution, comprising: memory in which at least one program is recorded; and a processor for executing the program, wherein: a quantization coefficient is defined as a monotonically increasing function of time, and the program performs initially setting the monotonically increasing function of time; performing machine learning based on a quantized learning equation using the quantization coefficient defined by the monotonically increasing function of time; determining whether the quantization coefficient satisfies a predetermined condition after increasing the time; newly setting the monotonically increasing function of time when the quantization coefficient satisfies the predetermined condition; and updating the quantization coefficient based on the newly set monotonically increasing function of time, and performing the machine learning, determining whether the quantization coefficient satisfies the predetermined condition, newly setting the monotonically increasing function of time, and updating the quantization coefficient are repeatedly performed.
 12. The machine-learning apparatus of claim 11, wherein the quantization coefficient is defined as a function varying over time as shown in Equation (41) below: $\begin{matrix} {{{\sigma(t)} = {\frac{\gamma}{24} \cdot {Q_{p}^{- 2}(t)}}},{\gamma \in R}} & (41) \end{matrix}$
 13. The machine-learning apparatus of claim 12, wherein is defined as shown in Equation (42) below: Q _(p) =η·b ^(n) η∈Z ⁺ , η<b  (42) where a base b is b∈Z⁺, b≥2.
 14. The machine-learning apparatus of claim 12, wherein the quantized learning equation is a learning equation for acquiring quantized weight vectors for all times, as defined in Equation (43) below: $\begin{matrix} \begin{matrix} {w_{t + 1}^{Q} = {w_{t}^{Q} - {{\frac{\alpha_{t}}{Q_{p}^{2}} \cdot Q_{p}}{\nabla{f\left( w_{t} \right)}}} + {{\overset{\rightarrow}{ɛ}}_{t}Q_{p}^{- 1}}}} \\ {= {{w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}} \cdot {\frac{1}{Q_{p}}\left\lbrack {Q_{p}{\nabla{f\left( w_{t} \right)}}} \right\rbrack}}}\because{\alpha_{t} \in {Q\left( {0,Q_{p}} \right)}}}} \\ {= {w_{t}^{Q} - {\frac{\alpha_{t}}{Q_{p}}{\nabla{f^{Q}\left( w_{t} \right)}}}}} \end{matrix} & (43) \end{matrix}$
 15. The machine-learning apparatus of claim 12, wherein the quantized learning equation is a learning equation based on a binary number system, as defined in Equation (44) below: w _(t+1) ^(Q) =w _(t) ^(Q)−2^(−(n-k))∇ƒ^(Q)(w _(t)), n,k∈Z ⁺ , n>k  (44)
 16. The machine-learning apparatus of claim 12, wherein the quantized learning equation is a probability differential learning equation defined in Equation (45) below: dW _(s)=−λ_(t)∇ƒ(W _(s))ds+√{square root over (2σ(s))}·d{right arrow over (B)} _(s)  (45)
 17. The machine-learning apparatus of claim 12, wherein the quantization coefficient is defined using h(t), which is a monotonically increasing function of time, as shown in Equation (46) below: Q _(p)(r)=η·b ^(h(t)), such that h (t)↑∞ as t→∞  (46)
 18. The machine-learning apparatus of claim 17, wherein initially setting the monotonically increasing function of time is configured to set the monotonically increasing function so as to satisfy Equation (47) below: $\begin{matrix} {\left. {\frac{C}{\ln\mspace{14mu} 2} \leq {\sigma(t)}} \right|_{t = 0} = {{{\frac{\gamma}{24} \cdot \left( {\eta \cdot b^{\overset{\_}{h}{(0)}}} \right)^{- 1}} \leq \frac{C_{1}}{\ln\mspace{14mu} 2}} = \left. {T(t)}\Rightarrow{{\log_{b}\frac{\gamma\;\ln\; 2}{24\eta}C_{1}^{- 1}} \leq {\overset{\_}{h}(0)} \leq {\log_{b}\frac{\gamma\;\ln\; 2}{24\eta}C^{- 1}}} \right.}} & (47) \end{matrix}$
 19. The machine-learning apparatus of claim 18, wherein, when determining whether the quantization coefficient satisfies the predetermined condition is performed, the predetermined condition is Equation (48) below: $\begin{matrix} {{\sigma(t)} \geq \frac{C}{\log\left( {t + 2} \right)}} & (48) \end{matrix}$
 20. The machine-learning apparatus of claim 19, wherein, when newly setting the monotonically increasing function of time is performed, the monotonically increasing function of time is defined as Equation (49) below: $\begin{matrix} {{\overset{\_}{h}\left( t_{1} \right)} = \left\lfloor {{\log_{b}\frac{y\;\ln\; 2}{24\eta}C^{- 1}} + 0.5} \right\rfloor} & (49) \end{matrix}$ 